/**
 * 
 */
package com.google.code.teamtools.client.widget;

import com.extjs.gxt.ui.client.binding.FormBinding;
import com.extjs.gxt.ui.client.data.ModelData;
import com.extjs.gxt.ui.client.widget.form.FormPanel;

/**
 * @author dk26uc
 *
 */
public abstract class AbstractEditorPanel extends FormPanel 
{
	protected boolean autoBind = true;
	protected FormBinding formBinding;
	
	protected AbstractEditorPanel()
	{
		super();
		setHeaderVisible(false);
		setBodyBorder(false);
	}

	public void bind(ModelData model)
	{
		formBinding = new FormBinding(this, autoBind);
		formBinding.bind(model);
	}
	
	public FormBinding getFormBinding()
	{
		return formBinding;
	}
}
